package com.zr.legalfactory.meiju;

/**
 * Created by 陈紫陌 on 2019-10-08.
 */

public enum StatusEnum {
    QIYONG(1,"启用"),JINYONG(0,"禁用");

    private final Integer statusValue;
    private final String statusName;

    private StatusEnum(Integer statusValue, String statusName){
        this.statusName=statusName;
        this.statusValue=statusValue;
    }
    public static String getName(Integer statusValue){
        for (StatusEnum s : StatusEnum.values()){
            if (s.statusValue.equals(statusValue)){
                return s.statusName;
            }
        }
        return null;
    }
    public static Integer getValue(String statusName) {
        for (StatusEnum s : StatusEnum.values()) {
            if (s.statusName.equals(statusName)) {
                return s.statusValue;
            }
        }
        return null;
    }
    public Integer getStatusValue() {
        return statusValue;
    }

    public String getStatusName() {
        return statusName;
    }
}
